package lab02.test02;

public class Circle {
    double r;
    double pai = Math.PI;
    double area;

    //无参构造
    public Circle() {
    }


    //有参构造
    public Circle(double r, double pai) {
        this.r = r;
        this.pai = pai;
    }

    //面积
    public double area() {
        return pai * r * r;
    }

    //周长
    public double circumference() {
        return 2 * pai * r;
    }

}

